home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
TPUG - Toronto PET Users Group
/
TPUG Users Group CD
/
TPUG Users Group CD.iso
/
C64
/
I-Info Magazine
/
(c)i20.d64
/
swordmaster ii
(
.txt
)
< prev
next >
Wrap
Commodore BASIC
|
2007-02-04
|
6KB
|
256 lines
10 POKE53280,0
20 POKE53281,0
30 PRINT"[147]SWORD MASTER[146][154]"
40 PRINT
50 PRINT
55 GOSUB2420
60 PRINT"YOUR QUEST IS TO DESTROY THE SOLDIERS INVADING THE KINGDOM"
70 V=53248
80 DP=150
90 POKE V+39,1
100 POKE V+40,15
120 W=0
130 REM *SEED RND GEN.
140 GOSUB 1520
150 FOR X=DP TO 157
160 SD=X*64
170 REM DP=SPRITE DATA BLOCK:SD=ACTUAL MEMORY LOC. OF DP
180 FOR BN=0 TO 62
190 READ D%
200 POKE BN+SD,D%
210 NEXT BN
220 NEXT X
230 REM***SPRITES DONE***
240 REM *SET UP INITIAL SPRITE X,Y
250 POKE V,100
260 POKE V+1,100
270 REM S0
280 POKE V+2,150
290 POKE V+3,100
300 REM S1
310 REM *NOW ASSIGN INITIAL DATA BLOCKS
320 POKE 2040,150
330 POKE 2041,155
340 REM *NOW GET INTO MAIN PRGM
350 E=0
360 RN=1
370 PRINT"[147]"
380 POKEV+21,3
390 PX=110
400 CX=160
410 POKEV,PX
420 POKEV+2,CX
430 GOSUB2400
440 ED=ED+1
450 IFED=2THENED=0:GOTO470
460 GOTO500
470 RN=RN+1
480 GOSUB1520
490 REM ROUND COUNTER
500 PRINT"[156]ROUND:[146][154]";RN
510 EP=INT((RND(0)*3)+1)+154
520 IFRN=11THENPRINT"FINAL ROUND[146][154]"
530 PW=INT((RND(0)*4)+1)+150
540 CP=INT(RND(0)*3)+1
550 IFCP=1THENCP=155
560 IFCP=2THENCP=156:CX=CX-2
570 IFCP=3THENCP=157
580 IF(CP>3)AND(CP<7)THENCP=157
590 POKE2041,CP
600 POKEV+2,CX
610 IFCX<(PX+10)THENCX=CX+10
620 IF(CP=156)AND(PEEK(2040)=150)AND(CX<PX+11)THEN940
630 PI=PEEK(56320)
640 POKE2040,150
650 IFPI=127THEN520
660 IFPI=126THENPP=151
670 IFPI=125THENPP=152
680 IFPI=119THENPP=153:PX=PX+2
690 IFPI=123THENPP=154:PX=PX-10
700 POKE2040,PP
710 POKEV,PX
720 IF(PP=153)AND(CP=EP)AND(PEEK(V+30)=3)THEN820
730 IF(CP=156)AND(PP=PW)AND(PEEK(V+30)=3)THEN940
740 IFPX<30THENPX=30
750 IFCX>190THENCX=190
760 IFPX>190THENPX=185
770 IFCX<30THENCX=40
780 IF(PP=151)AND(CP=155)THENGOSUB1350
790 IF(PP=152)AND(CP=157)THENGOSUB1350
800 IF(PP=153)AND(CP=156)THENGOSUB1350
810 GOTO540
820 SE=SE+1
830 PRINT"HITS TO ENEMY: [157][157][157][157]";SE;"[146]"
840 IFSE<1+(RN/2)THEN540
850 IFRN>10THEN1030
860 SE=0
870 P3=P3+1
880 PRINT"ENEMIES KILLED:[146] ";P3
890 POKEV+21,1
900 FORZC=1TO1500
910 NEXTZC
920 PRINT"[147]"
930 GOTO380
940 P2=P2+1
950 PRINT"HITS:[146] ";P2
955 IFP2>11THEN1050
960 FORZC=1TO1500
970 NEXT
980 IFP2>RN+20THEN1000
990 GOTO520
1000 POKEV+21,2
1010 PRINT"THE VICTOR[146][154]"
1020 END
1030 POKEV+21,1
1040 PRINT"THE VICTOR[146][154]"
1050 PRINT" RATING [146]"
1060 PRINT
1070 PRINT" ";
1080 IFP2<5THENPRINT"SWORDMASTER[154]":GOTO1260
1090 IFP2<6THENPRINT"KNIGHT[154]":GOTO1260
1100 IFP2<7THENPRINT"SWORDSMAN[154]":END
1110 IFP2<8THENPRINT"WARRIOR[154]":END
1120 IFP2<9THENPRINT"FIGHTER[154]":END
1130 IFP2<10THENPRINT"BRIGAND[154]":END
1140 IFP2<11THENPRINT"PEASANT-IN-TRAINING[154]":END
1145 IFP2>11THENPRINT"YOUR DEAD LOSER":END
1150 END
1160 FORPK=150TO153
1170 GOSUB1360
1180 POKE2040,PK
1190 FORPL=1TO400
1200 NEXTPL
1210 NEXTPK
1220 GOSUB1520
1230 PRINT"[147]"
1240 POKEV+21,0
1250 END
1260 FORPK=151TO152
1270 GOSUB1360
1280 POKE2040,PK
1290 FORPL=1TO800
1300 NEXTPL
1310 NEXTPK
1320 GOSUB1520
1330 POKEV+21,0
1340 END
1350 IFPEEK(V+30)<>3THENRETURN
1360 POKE54296,15
1370 POKE54277,0
1380 POKE54278,231
1390 POKE54284,0
1400 POKE54285,231
1410 POKE54273,155
1420 POKE54272,120
1430 POKE54280,INT(RND(0)*2)+105
1440 POKE54279,INT(RND(0)*255)+1
1450 POKE54276,33
1460 POKE54283,21
1470 FORZ3=1TO49
1480 NEXT
1490 POKE54276,32
1500 POKE54283,20
1510 RETURN
1520 REM***SUBROUTINE TO PLAY MAIN THEME***
1530 POKE 54296,15
1540 POKE 54277,21
1550 POKE 54278,33
1560 POKE 54284,21
1570 POKE 54285,199
1580 POKE 54276,33
1590 POKE 54283,33
1600 POKE54284,17
1610 POKE54272,37
1620 POKE54280,45
1630 POKE54279,198
1640 LV=100
1650 GOSUB1930
1660 POKE54273,17
1670 POKE54272,37
1680 POKE54280,45
1690 POKE54279,198
1700 LV=150
1710 GOSUB1930
1720 POKE54273,22
1730 POKE54272,227
1740 POKE54280,61
1750 POKE54279,126
1760 LV=300
1770 GOSUB1930
1780 POKE54273,17
1790 POKE54272,37
1800 POKE54280,45
1810 POKE54279,198
1820 LV=100
1830 GOSUB1930
1840 POKE54273,22
1850 POKE54272,227
1860 POKE54280,61
1870 POKE54279,126
1880 LV=590
1890 GOSUB1930
1900 POKE54276,32
1910 POKE54283,32
1920 RETURN
1930 FORD=1TOLV
1940 NEXT
1950 POKE54276,32
1960 POKE54283,32
1970 POKE54276,33
1980 POKE54283,33
1990 RETURN
2000 REM *****64 ENGARDE*****
2010 DATA 12,0,0,30,0,0,63,0,0,30,0,0,12,0,0,255,194,0,255,242
2020 DATA 0,233,127,254,223,63,255,223,2,0,223
2030 DATA 2,0,31,0,0,63,128,0,123,192,0,241,224,0,224
2040 DATA 224,0,113,192,0,113,192,0,59,128,0,31,0,0,127,192,0
2050 REM *****64 UP BLOCK*****
2060 DATA 6,0,2,15,0,12,31,128,28,15,0,56,6,0,112,31,196,224
2070 DATA 127,227,192,239,179,128,207,159,128,207,156,64,207
2080 DATA 136,0,207,128,0,31,192,0,61,224,0,120,240,0,96,48
2090 DATA 0,112,112,0,56,224,0,24,192,0,24,192,2,120,240,0
2100 REM *****64 DOWN BLOCK*****
2110 DATA 3,0,0,7,128,0,15,192,0,231,128,0,243,0,0,223,128,0
2120 DATA 207,240,0,207,248,0,207,140,0,15,140,128,15,135
2130 DATA 0,15,131,0,31,199,128,61,233,192,120,240,224,96,48
2140 DATA 112,112,112,56,56,224,28,24,192,14,24,192,0,120,240,0
2150 REM *****64 THRUST*****
2160 DATA 0,0,0,0,96,0,0,240,0,1,248,0,0,240,0,0,96,0,7,248
2170 DATA 0,15,248,0,25,234,0,49,234,0,35,239,254,39,239,255
2180 DATA 7,194,0,15,130,0,13,192,0,28,224,0,56,96,0
2190 DATA 112,192,0,96,192,0,193,128,0,112,224,0
2200 REM *****64 DODGE*****
2210 DATA 0,0,0,0,96,0,0,240,0,1,248,0,0,240,0,0,48,0,3
2220 DATA 255,208,14,126,56,24,61,16,48,56,224,24,19,192
2230 DATA 12,6,32,4,12,192,0,25,224,0,50,112,0,100,48,0
2240 DATA 200,24,1,144,24,1,56,28,2,24,12,0,112,15
2250 REM *****EVIL ENGARDE*****
2260 DATA 64,27,96,64,39,144,96,15,192,96,7,128,48,3,0,56
2270 DATA 31,224,28,63,240,14,167,248,7,103,220,3,231
2280 DATA 196,4,199,196,0,135,196,0,7,196,0,14,224,0,28,112
2290 DATA 0,24,48,0,24,48,0,24,48,0,24,48,0,24,48,0,120,240
2300 REM *****EVIL THRUST*****
2310 DATA 0,53,128,0,78,64,0,31,0,0,14,0,0,6,0,0,31,0,0,63
2320 DATA 128,0,63,192,1,46,192,129,47,96,127,175,176,63
2330 DATA 239,152,1,15,200,1,15,200,0,29,224,0,56,96,0,28
2340 DATA 112,0,28,56,0,12,28,0,12,6,0,56,28
2350 REM *****EVIL DOWN BLOCK*****
2360 DATA 0,27,96,0,39,144,0,15,192,0,7,128,0,3,0,0,63,224,0
2370 DATA 255,240,4,199,248,3,135,220,3,7,196,7,135,196,14,7,196,28,7,196
2380 DATA 56,14,224,240,28,112,96,24,48,0,24,48,0,24,48,0,24
2390 DATA 48,0,24,48,0,120,240
2400 PRINT"[147]"
2410 SE=SE-1
2420 PRINT"[221][158][214][146]"
2430 PRINT"[221]"
2440 PRINT"[166][221][166] [166] [166]"
2450 PRINT"[166][166][166][166][166][166][166]"
2460 PRINT"[166] [166] [166] [166]"
2470 PRINT"[166][166][166][166][166][166][166]"
2480 PRINT"[166][166][169] [223][166][166]"
2490 PRINT"[166][166] [166][166]"
2500 PRINT"[166][166] [166][166][151][219][219][219][219][219][219][219][219][219][219][219][219][219][219][219][219][219][219][219][219][219][219][219][219][219][219][219][219][219][219][219][219][219]
2510 [153]"POKE(null)(null)VERIFY POKE(null)(null)(null)(null)(null)(null)(null)(null)(null)(null)(null)(null)(null)(null)(null)(null)(null)(null)(null)(null)(null)(null)(null)(null)(null)(null)(null)(null)(null)(null)(null)(null)(null)(null)(null)"
2520 [153]"(null)VERIFY POKE(null)(null)(null)(null)(null)(null)(null)(null)(null)(null)(null)(null)(null)(null)(null)(null)(null)(null)(null)(null)(null)(null)(null)(null)(null)(null)(null)(null)(null)(null)(null)(null)(null)(null)"
2530 [142]